/** 
 * @Title : Test.java 
 * @Package cn.edu.scu.healthserver.domain 
 * @Description : TODO 
 * @author 
 * @date 
 * @version V0.0   
 */
package cn.edu.cdtu.healthclient.domain;

import java.io.Serializable;

/** 
 * @ClassName : Test 
 * @Description : TODO
 * @author 
 * @date 
 */
public class Test implements Serializable{
	/** 
	 * @Fields serialVersionUID : TODO
	 */ 
	private static final long serialVersionUID = 1L;
	private int id;
	private String test;
	private int type_id;
	private String description;
	private int question_sum;
	private int available = 1;

	/**
	 * 
	 * @Title: Test
	 * @Description: TODO
	 * @throws 
	 *
	 */
	public Test() {
	}

	/**
	 * 
	 * @Title: Test
	 * @Description: TODO
	 * @throws 
	 *
	 * @param test
	 * @param type_id
	 * @param description
	 * @param question_sum
	 */
	public Test(String test, int type_id, String description, int question_sum) {
		this.test = test;
		this.type_id = type_id;
		this.description = description;
		this.question_sum = question_sum;
	}

	/**
	 * 
	 * @Title: Test
	 * @Description: TODO
	 * @throws 
	 *
	 * @param id
	 * @param test
	 * @param type_id
	 * @param description
	 * @param question_sum
	 */
	public Test(int id, String test, int type_id, String description,
			int question_sum) {
		this.id = id;
		this.test = test;
		this.type_id = type_id;
		this.description = description;
		this.question_sum = question_sum;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the test
	 */
	public String getTest() {
		return test;
	}

	/**
	 * @param test the test to set
	 */
	public void setTest(String test) {
		this.test = test;
	}

	/**
	 * @return the type_id
	 */
	public int getType_id() {
		return type_id;
	}

	/**
	 * @param type_id the type_id to set
	 */
	public void setType_id(int type_id) {
		this.type_id = type_id;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the question_sum
	 */
	public int getQuestion_sum() {
		return question_sum;
	}

	/**
	 * @param question_sum the question_sum to set
	 */
	public void setQuestion_sum(int question_sum) {
		this.question_sum = question_sum;
	}

	/**
	 * @return the available
	 */
	public int getAvailable() {
		return available;
	}

	/**
	 * @param available the available to set
	 */
	public void setAvailable(int available) {
		this.available = available;
	}

	/* (non-Javadoc)
	 * <p>Title: hashCode</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + available;
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		result = prime * result + id;
		result = prime * result + question_sum;
		result = prime * result + ((test == null) ? 0 : test.hashCode());
		result = prime * result + type_id;
		return result;
	}

	/* (non-Javadoc)
	 * <p>Title: equals</p> 
	 * <p>Description: </p> 
	 * @param obj
	 * @return 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Test other = (Test) obj;
		if (available != other.available)
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (id != other.id)
			return false;
		if (question_sum != other.question_sum)
			return false;
		if (test == null) {
			if (other.test != null)
				return false;
		} else if (!test.equals(other.test))
			return false;
		if (type_id != other.type_id)
			return false;
		return true;
	}

	/* (non-Javadoc)
	 * <p>Title: toString</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Test [id=" + id + ", test=" + test + ", type_id=" + type_id
				+ ", description=" + description + ", question_sum="
				+ question_sum + ", available=" + available + "]";
	}
	
}
